/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface WecharCusMoney extends BasicModel<WecharCusMoney> {
  cusCode?: string; // 客户编码
  zhYe?: number; // 账户余额
  flhxYe?: number; // 返利核销余额
  cxhxYe?: number; // 促销核销余额
}

export const wecharCusMoneyList = (params?: WecharCusMoney | any) =>
  defHttp.get<WecharCusMoney>({ url: adminPath + '/setting/price/wecharCusMoney/list', params });

export const wecharCusMoneyListData = (params?: WecharCusMoney | any) =>
  defHttp.post<Page<WecharCusMoney>>({
    url: adminPath + '/setting/price/wecharCusMoney/listData',
    params,
  });

export const wecharCusMoneyForm = (params?: WecharCusMoney | any) =>
  defHttp.get<WecharCusMoney>({ url: adminPath + '/setting/price/wecharCusMoney/form', params });

export const wecharCusMoneySave = (params?: any, data?: WecharCusMoney | any) =>
  defHttp.postJson<WecharCusMoney>({
    url: adminPath + '/setting/price/wecharCusMoney/save',
    params,
    data,
  });

export const wecharCusMoneyDelete = (params?: WecharCusMoney | any) =>
  defHttp.get<WecharCusMoney>({ url: adminPath + '/setting/price/wecharCusMoney/delete', params });
